package com.itheima.chapter09.io.bytestream;

import java.io.FileOutputStream;
import java.io.IOException;

//字节写数据的3 种方式
public class OutputDemo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos =new FileOutputStream("D:\\my_project\\b.txt");
        FileOutputStream fos1 =new FileOutputStream("D:\\my_project\\a.txt");
        fos.write(97);
        fos.write(98);
        byte[] bys ={99,100,101,102,103,104,105,106,107};
        byte[] bys1 ={101,102,103,104,105,106,107};
        fos.write(bys);
        fos1.write(bys1,2,5);
        fos.close();
        fos1.close();
    }
}
